import torch as pt
from python_ai.common.xcommon import *

pt.set_printoptions(edgeitems=100)

sep('3x4')
x = pt.arange(1, 3*4+1).view(3, 4)
print(x)

sep('index_select')
x2 = pt.index_select(x, 0, pt.Tensor([0, 2]).long())
print(x2)
x3 = pt.index_select(x, 1, pt.Tensor([0, 2]).long())
print(x3)
